<title>memcpy function</title>

<head>
<script language="JavaScript">
</script>
</head>

<body bgcolor=#ffffcc>
<hr>
<center>
<h1>memcpy function</h1>
</center>
<hr>
<p>
<b>memcpy</b> copies data between two memory locations. This function will copy the
supplied number of bytes
stored at the location pointed to by 's2' to the location pointed to by 's1'.

<p>
<center>
<table border=2 width="80%" bgcolor="ivory">
<tr><td>
<pre>

     	s1		s2
	|		|
	V		V
        - - - -		---------------	
       | | | | |       | a | b | c | d |
        - - - -		---------------	
	^ ^		|    |
	| |		|    |
	 -|-------------     |
	   ------------------
</pre>
</td></tr>
</table>
</center>
<p>
<hr>

<h2>Prototype</h2>

<center>
<table border=2 width="80%" bgcolor="ivory">
<tr><td>
<pre>
    Library:   string.h

    Prototype: char memcpy(void *s1, void *s2, int num);

    Syntax:
               float data1;
               char  data2[64];
               
               memcpy(data1, data2, sizeof(data2));
</pre>
</td></tr></table></center><p>
<hr>

<h2>Notes</h2>

This is a handy function for moving data between data types

<h2>See also:</h2>

<img src="../../GRAPHICS/whiteball.gif">
<a href="strtok.html>strtok"</a>
<br>

<img src="../../GRAPHICS/whiteball.gif">
<a href="strncpy.html">strncpy</a> 
<br>

<img src="../../GRAPHICS/whiteball.gif">
<a href="strcpy.html">strcpy</a> 
<br>

<img src="../../GRAPHICS/whiteball.gif">
<a href="sprintf.html">sprintf</a> 
<br>

<img src="../../GRAPHICS/man.gif">
<a href="../MAN/strcat.htm"><i>strcat</a>
<br>

<img src="../../GRAPHICS/whiteball.gif">
<a href="../CONCEPT/string.html">strings</a>
<br>

<img src="../../GRAPHICS/whiteball.gif">
<a href="../FUNCTIONS/memcpy.htm">memcpy</a> Copy data from one memory location to another.

<p>

<hr>
<p>
<center>
<table border=2 width="80%" bgcolor="ivory">
<tr align=center>
<td width="25%">
<a href="../cref.html">             Top</a>
</td><td width="25%">
<a href="../master_index.html">     Master Index</a>
</td><td width="25%">
<a href="../SYNTAX/keywords.html">  Keywords</a>
</td><td width="25%">
<a href="funcref.htm">              Functions</a>
</td>
</tr>
</table>
</center>
<p>
<hr>
<address><a href="../../address.html">Martin Leslie</a> 
</address><p>
</body>
</html>
